package com.cy.controller;

import com.cy.common.ResultResponse;
import com.cy.service.IStatisticsService;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  数据统计控制层
 * </p>
 *
 * @author Aleven
 * @since 2024-12-21
 */
@RestController
@RequestMapping("/statistics")
public class StatisticsController {
    @Autowired
    private IStatisticsService statisticsService;
    @Operation(summary = "更新报名人数")
    @GetMapping("/updateEnrollmentCount")
    public ResultResponse updateEnrollmentCount(Integer CourseID){
        int count = statisticsService.updateEnrollmentCount(CourseID);
        return ResultResponse.success(count);
    }
}
